docs(runtime): give the retention witness its section, and take back the comment that outlived its method - #335
docs(runtime): give the retention witness its section, and take back the comment that outlived its method#335PhysShell wants to merge 1 commit into
Conversation
…the comment that outlived its method The remainder PR #280 left behind (#334). Three items, no code restored. **1. A doc comment outlived its method.** `0753a45` extracted the witness "minus the dominator tree" and removed the method but kept its `<summary>`, which C# then bound to the next member regardless of the blank line. `Dispose()` was documented as *"the dominator tree of the whole live graph, with retained sizes"* — the file advertising the one capability the extraction removed. Deleted. **2. `RetentionPath` was the only runtime tool with no README section**, while `README.md:27` kept advertising *"Heap analysis (retained, duplicates, retention paths) — ClrMD"* in the stack table. It now has one, covering what the two verbs answer and why the split matters: `census` first, because `ClrHeap.EnumerateObjects()` returns uncollected garbage too and a big heap is not evidence of a leak; then `roots`, with the field names that turn "this object is alive" into "this field is holding it". Including the parts that constrain trust rather than advertise: shares are shares of the RESOLVED SAMPLE and never of the population; the verdict is computed over every instance so no display budget can move it; a `[stack]` root is liveness, not retention; the type matcher deliberately refuses `System.Func<…GTDGoody…>` because it once confidently reported a 2-hop path to the wrong object. Plus the exit-code table and why exit 2 is a tier of its own. The Layout block and the Status list were both missing the tool as well; both now name it, and Status records the dominator tree under **Deferred** rather than leaving it unmentioned. **3. The dangling pointer.** `Heap.cs:34` told the reader "See the README" about the dominator tree, and the README had nothing to see. It now points at the section that exists, says plainly that dominance is NOT implemented here, and sends anyone who wants the reasoning to #334 — where the extracted implementation's argument is recorded. `Dominators.cs` is not restored, per the issue. The comment in the csproj that names the exclusion stays; it is the record of a decision, and the only thing wrong with it was that everything it pointed at was missing. One correction to #334 itself: it located the dangling pointer in `Program.cs`. It is in `Heap.cs:34`. `Program.cs` mentions the dominator tree too, but as an aside without a cross-reference, so it needed nothing. Verified: build 0 warnings / 0 errors, classifier selftest 16/16, ingest selftest 26/26, tests/run_tests.py wpf 28/28. Checked that all four runtime tools now have a README section, and that no dominator code came back. Closes #334. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Lmcv3X9PoELp8CGDfNc9m
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe runtime documentation now describes the RetentionPath tool, its commands, output and exit-code contracts, limitations, and runtime status. Heap documentation no longer assigns the removed dominator-tree analysis to ChangesRetentionPath documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This PR updates runtime documentation and removes an obsolete comment without changing runtime behavior; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review Generated by Claude Code |
|
✅ Action performedFull review finished. |
Closes #334 — the remainder carved out when PR #280 was closed as superseded. Independent of #333: different branch, no shared files, mergeable in any order.
Dominators.csis not restored, per the issue.Что и зачем
0753a45приземлил свидетеля «minus the dominator tree» — решение осознанное и записанное в csproj. Но три вещи остались висеть:<summary>про доминаторы пережил свой метод и стал документацией кDispose();RetentionPathоказался единственным из четырёх runtime-инструментов без секции в README, хотя таблица его возможность обещает; и указатель «See the README» вёл в пустоту. Здесь всё три закрыты, кода не возвращено.1. A doc comment outlived its method
The extraction removed the method and kept its
<summary>, which C# then binds to the next member regardless of the blank line:So the file advertised, on
Dispose(), precisely the capability the extraction had removed. Deleted.2.
RetentionPathhad no README sectionIt was the only one of the four runtime tools without one, while
README.md:27kept advertising "Heap analysis (retained, duplicates, retention paths) — ClrMD" in the stack table:LeakHarnessDuplicateDetectorPropertyChangedStormRetentionPathThe new section covers what the two verbs answer and why the order matters —
censusfirst, becauseClrHeap.EnumerateObjects()returns uncollected garbage too and a big heap is not evidence of a leak; thenroots, with the field names that turn "this object is alive" into "this field is holding it".Deliberately weighted toward the parts that constrain trust rather than advertise:
--sample,--max-hops) can move the diagnosis or the exit code;[stack]root is liveness, not retention;System.Func<…GTDGoody…>because it once confidently reported a 2-hop path to the wrong object;Plus the exit-code table and why exit 2 is a tier of its own, cross-linked to
docs/runtime-witness-operations.md.LayoutandStatuswere missing the tool too; both now name it, andStatusrecords the dominator tree under Deferred instead of leaving it unmentioned.3. The dangling pointer
Heap.cs:34said "See the README" about the dominator tree and the README had nothing to see. It now points at a section that exists, states plainly that dominance is not implemented here, and sends anyone wanting the reasoning to #334, where the extracted implementation's argument is recorded.Одна поправка к самому #334
Issue поместил dangling pointer в
Program.cs. Он вHeap.cs:34.Program.csтоже упоминает dominator tree, но как ремарку без перекрёстной ссылки, поэтому править там нечего. Записываю, потому что issue писал я, и ошибка в нём — моя.Тип изменения
Как проверено
dotnet build audit/runtime/RetentionPath -c Release→ 0 warnings, 0 errorsRetentionPath selftest→ 16/16python audit/runtime/ingest.py --selftest→ 26/26python tests/run_tests.py→ exit 0, wpf 28/28Dominators.csне вернулсяСвязанные issue
Closes #334. Refs #280 (closed as superseded), #309,
0753a45.Чеклист
Generated by Claude Code
Summary by CodeRabbit
censusandrootscommands.runtime.jsonintegration.